//
//  ViewController.m
//  6-1
//
//  Created by mac on 16-6-1.
//  Copyright (c) 2016年 ztt. All rights reserved.
//

#import "ViewController.h"
#import "TwoViewController.h"
@interface ViewController ()
{
    NSArray *ren;
}

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    ren = @[
            @"六月一日",
            @"请开心微笑。",
            ];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return ren.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *fen = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:nil];
    fen.textLabel.text = ren[indexPath.row];
    fen.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    return fen;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    TwoViewController *cn = [TwoViewController new];
    [self.navigationController pushViewController:cn animated:YES];
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
